<template>
	<app-layout :haveBackground="haveBackground" :style="{marginBottom:BotHeight + 'rpx'}">
	<view class="">
			
		<!-- 11.01 假拼团（邀请好友送金币） :useridshgold="useridshgold" -->
		<view class="">
			<tastlist :useridshgold="useridshgold" :targoodsid="targoodsid" :useridres="useridres" :mallid="mallid"
				flotop="55%" floleft="0" ref="task"></tastlist>
		</view>
		<app-my-app v-if="config.is_add_app == 1"></app-my-app>

		<!-- 搜索 -->
		<view class="page-width">
			<!-- 11.10 随机跳转 -->
			<swiper class="suiji" vertical circular :autoplay="true" :interval="3000" :duration="1000">
				<swiper-item class="suiji" v-for="(item,index) in froseah" :key="index" @click="jump(item.url)">
					<view class="suiji">
						<image :src="item.icon_url" mode=""></image>
					</view>
				</swiper-item>
			</swiper>
			<view class="app-view">
				<view class="jump dir-left-nowrap main-center cross-center" @click="jump('/pages/search/search')">
					<view class="input main-center">
						<view class="app-text-search dir-left-nowrap cross-center">
							<view class="app-icon u-iconfont">&#xe600;</view>
							<text class="text">{{JSON.parse(this.config.vdian_earnings_ratio).keywords}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 11.10 文字导航1 -->
		<view class="index-nav">
			<view class="app-index-nav dir-left-nowrap cross-center boxshaw">
				<scroll-view scroll-x class="app-scroll awidth">
					<view class="cross-center aheighr">
						<view class="app-item" v-if="activ.status == 1">
							<app-jump-button form :url="activ.url" :open_type="activ.open_type">
								<image class="app-item-img" :src="activ.icon_url" mode="heightFix">
								</image>
							</app-jump-button>
						</view>
						<view class="app-item" v-for="(item,index) in pageList[3].subnav" :key="item.id"
							v-if="index < pageList[3].subnav.length-1">
							<app-jump-button form :url="item.url" :open_type="item.open_type">
								{{item.name}}
							</app-jump-button>
						</view>
					</view>
				</scroll-view>
				<view class="newest" v-for="(item,index) in pageList[3].subnav" :key="item.id"
					v-if="index == pageList[3].subnav.length-1">
					<!-- <app-jump-button form url="/pages/cats/index">
						最新最新
					</app-jump-button> -->
					<app-jump-button form :url="item.url">
						{{item.name}}
					</app-jump-button>
				</view>
			</view>
		</view>

		<!-- banner 宽度圆角取消 -->
		<!-- <view v-if="pageList[5].subnav.length > 0" style="margin: 20rpx auto 32rpx;">
			<app-swiper :list="pageList[5].subnav" mode="rect" name="icon_url" :height="264" :autoplay="true">
			</app-swiper>
		</view> -->
		<view class="dir-left-nowrap" style="margin: 20rpx auto 32rpx;">
			<view class="searcf">
				<app-jump-button form :url="pageList[252].url">
					<image class="img" :src="pageList[252].icon_url"></image>
				</app-jump-button>
			</view>
			<view class="" style="width: 375rpx;">
				<app-swiper :itemStyle="itemStyle" :list="pageList[254].subnav" mode="rect" name="icon_url"
					:height="400" :autoplay="true">
				</app-swiper>
			</view>
		</view>
		<!-- 导航1 -->
		<view class="">
			<!-- 176-20 -->
			<app-navigation-icon v-if="pageList[2].subnav.length > 0" navHeight="156" navMargin="20rpx auto"
				iconRadius="50%" :navs="pageList[2].subnav" background="#f7f7f7" :scroll="true" columns="5" :rows="2">
			</app-navigation-icon>
		</view>

		<!-- 11.10 修改 导航2 -->
		<view class="">
			<!-- 326-28 -->
			<app-navigation-icon nextMargin="108rpx" :autoplay="false" v-if="pageList[4].subnav.length > 0"
				navHeight="298" navMargin="20rpx auto" :navs="pageList[4].subnav" background="#f7f7f7" :scroll="true"
				:columns="3" :imgStyle="imgstyle" :rows="1">
			</app-navigation-icon>
		</view>

		<!-- 11.10 文字导航2 -->
		<view class="index-nav">
			<view class="app-index-nav dir-left-nowrap cross-center">
				<scroll-view scroll-x class="app-scroll cross-center">
					<view class="app-item" v-for="(item,index) in pageList[4].subnav" :key="item.id"
						:class="index==0 ? 'active' : ''">
						<app-jump-button form :url="item.url">
							{{item.name}}
						</app-jump-button>
					</view>
				</scroll-view>
			</view>
		</view>
		<!-- 直播 -->
		<view class='partner' v-if="pageList[9]">
			<app-jump-button form :open_type="pageList[9].open_type" :url="pageList[9].url">
				<image :lazy-load="true" mode="widthFix" :src="pageList[9].icon_url" class="image" />
			</app-jump-button>
		</view>
		<!-- 图片魔方 -->
		<view class='activity' v-if="pageList[6].subnav.length > 0 || pageList[7].subnav.length > 0">
			<view class='assemble' v-if="pageList[6].subnav.length > 0">
				<!-- 9.22 修改为 轮播图 -->
				<swiper class="swiper" :indicator-dots="pageList[6].subnav.length > 1 ? true : false" autoplay="true"
					circular="true" indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#fff">
					<swiper-item v-for="(items,indexs) in pageList[6].subnav" :key="indexs">
						<app-jump-button form :url="items.url">
							<image :src="items.icon_url" class="slide-image" />
						</app-jump-button>
					</swiper-item>
				</swiper>
			</view>
			<view class='listR' v-if="pageList[7].subnav.length > 0">
				<view class="listRt" v-for="(items,indexs) in pageList[7].subnav" :key="indexs">
					<app-jump-button form :url="items.url">
						<image :lazy-load="true" :src="items.icon_url" class="slide-image" />
					</app-jump-button>
				</view>
			</view>
		</view>
		<!-- 城市 -->
		<view class="today" v-if="pageList[48]" @click="jump(pageList[48].url)">
			<image :lazy-load="true" :src="pageList[48].icon_url" class="image" mode="widthFix" />
		</view>
		<!-- 今日爆款，猜你喜欢 不轮播 -->
		<view class="betsepar" v-if="pageList[60].subnav.length > 0">
			<view class="betseparone" v-for="(item,index) in pageList[60].subnav" :key="index" @click="jump(item.url)"
				v-if="index < 2">
				<view class="image">
					<image class="img" :lazy-load="true" :src="item.icon_url" mode=""></image>
				</view>
				<view class="title u-line-1">
					{{item.name}}
					<view style="float: right;">点击进入>>></view>
				</view>
			</view>
		</view>
		<!-- 成为双熙堂合伙人 20220118取消 -->
		<!-- <view class='partner' v-if="pageList[9]">
			<app-jump-button form :open_type="pageList[9].open_type" :url="pageList[9].url">
				<image :lazy-load="true" mode="widthFix" :src="pageList[9].icon_url" class="image" />
			</app-jump-button>
		</view> -->
		<!-- 联动轮播 -->
		<view class="bannershop" v-if="banner_navs.length > 0">
			<scroll-view :scroll-into-view="'banclasify'+banid" scroll-with-animation scroll-x
				class="app-scroll-banner cross-center">
				<view class="app-item" :id="'banclasify'+index" v-for="(item,index) in banner_navs" :key="index"
					:class="index==banid ? 'active' : ''" @click="change(index)">
					{{item.name}}
				</view>
			</scroll-view>
			<swiper :current="banid" class="banner-swiper" autoplay circular :interval="5000" :duration="500"
				@change="swichange" @animationfinish="animationfinish">
				<swiper-item class="banner-swiper-item" v-for="(item,index) in banner_navs" :key="index">
					<view class='ban-activity'>
						<app-jump-button form :url="item.url">
							<image class="ban-act-img" :src="item.icon_url" mode=""></image>
						</app-jump-button>

						<!-- <view class='ban-assemble'>
							<swiper class="swiper" autoplay circular :interval="2000" @change="smswic">
								<swiper-item v-for="(items,indexs) in item.subnav" :key="indexs" v-if="indexs > 1">
									<image :src="items.icon_url" class="slide-image" />
								</swiper-item>
							</swiper>
						</view>
						<view class="ban-assemble fixed">
							<app-jump-button form :url="item.subnav[smswicid].url"></app-jump-button>
						</view>
						<view class='listR'>
							<view class="listRt" v-for="(items,indexs) in item.subnav" :key="indexs" v-if="indexs < 2">
								<app-jump-button form :url="items.url">
									<image :lazy-load="true" :src="items.icon_url" class="slide-image" />
								</app-jump-button>
							</view>
						</view> -->
					</view>
				</swiper-item>
			</swiper>
		</view>
		<!-- 图片导航 -->
		<view class="">
			<app-navigation-icon :istext="false" v-if="pageList[225].subnav.length > 0" navHeight="178"
				navMargin="0 auto" nextMargin="80rpx" :imgStyle="imgstyle3" :navs="pageList[225].subnav"
				background="#f7f7f7" :scroll="true" columns="2" :rows="1">
			</app-navigation-icon>
		</view>
		<!-- 实体店直播，好货快快抢 -->
		<view class="beseparate" v-if="pageList[10].subnav.length > 0">
			<app-jump-button class="besebutton" v-for="(item,idx) in pageList[10].subnav" :key="idx" form
				open_type="redirect" :url="item.url">
				<view class="besepone">
					<image :lazy-load="true" class="image" :src="item.icon_url" mode=""></image>
				</view>
			</app-jump-button>
		</view>
		<!-- 今日推荐 -->
		<view class="today" v-if="pageList[54]" @click="jump(pageList[54].url)">
			<image :lazy-load="true" :src="pageList[54].icon_url" class="image" mode="widthFix" />
		</view>
		<!-- 今日爆款，猜你喜欢 -->
		<view class="bepartner" v-if="pageList[59].subnav.length > 0 && pageList[61].subnav.length > 0">
			<view class="bepartnerone" @click="jump(pageList[59].url)" v-if="pageList[59].subnav.length > 0">
				<swiper class="swiper" :autoplay="true" :interval="3000" :duration="500" :circular="true"
					:disable-touch="true">
					<swiper-item v-for="(item,index) in pageList[59].subnav" :key="index">
						<view class="image">
							<image class="img" :lazy-load="true" :src="item.icon_url" mode=""></image>
						</view>
					</swiper-item>
				</swiper>
				<view class="title u-line-1">
					{{pageList[59].name}}
					<view style="float: right;">点击进入>>></view>
				</view>
			</view>
			<view class="bepartnerone" @click="jump(pageList[61].url)" v-if="pageList[61].subnav.length > 0">
				<swiper class="swiper" :autoplay="true" :interval="3000" :duration="500" :circular="true"
					:disable-touch="true">
					<swiper-item v-for="(item,index) in pageList[61].subnav" :key="index">
						<view class="image">
							<image class="img" :lazy-load="true" :src="item.icon_url" mode=""></image>
						</view>
					</swiper-item>
				</swiper>
				<view class="title u-line-1">
					{{pageList[61].name}}
					<view style="float: right;">点击进入>>></view>
				</view>
			</view>
		</view>
		<!-- 今日爆款，猜你喜欢 不轮播 -->
		<!-- <view class="betsepar" v-if="pageList[59].subnav.length > 0">
			<view class="bepartnerone" v-for="(item,index) in pageList[59].subnav" :key="index" @click="jump(item.url)"
				v-if="index < 2">
				<view class="image">
					<image class="img" :lazy-load="true" :src="item.icon_url" mode=""></image>
				</view>
				<view class="title u-line-1">
					{{item.name}}
					<view style="float: right;">点击进入>>></view>
				</view>
			</view>
		</view> -->
		<!-- 列表循环 -->
		<view class="">
			<!-- 10.11 10.14 翻转 -->
			<u-indexware :value="blendList"></u-indexware>
			<!-- <u-goods-ware :value="blendList" @routego="routeGo"></u-goods-ware> -->
		</view>
		<!-- 返回顶部 -->
		<!-- <view class="quick-box dir-top-nowrap" style="bottom: 180rpx" :style="{opacity:opacity}">
			<image @click="backTop" class="quick-btn" src="../../static/image/icon/back-top.png"></image>
		</view> -->
		<view class="quick-box dir-top-nowrap" style="bottom: 180rpx">
			<!-- 11.12 注释购物车 -->
			<!-- <app-jump-button url="/pages/cart/cart" open_type="redirect">
				<image :lazy-load="true" class="quick-btn" src="../../static/image/icon/goods-list-card.png"></image>
			</app-jump-button> -->
			<image :lazy-load="true" @click="backTop" class="quick-btn" src="../../static/image/icon/back-top.png"
				v-if="opacity == 1"></image>
		</view>
		<app-tab-bar ></app-tab-bar>
	</view>
	</app-layout>
</template>
<script>
	import {
		mapGetters,
		mapState,
		mapMutations
	} from 'vuex';
	
	import appMyApp from '../../../components/page-component/app-my-app/app-my-app.vue';
	import appTabBar from "../../../components/basic-component/app-tab-bar/app-tab-bar.vue"
	import appSwiper from '../../../components/page-component/app-swiper/app-swiper.vue';
	import appNavigationIcon from '../../../components/page-component/app-navigation-icon/app-navigation-icon.vue';
	import uIndexware from '../../../components/page-component/u-goods-list/u-indexware.vue';
	// 9.18
	import tastlist from '../../../pages/tasklist/tasklist.vue'
	// 10.11 10.14 注释
	// import uGoodsWare from '../../components/page-component/u-goods-list/u-goods-ware.vue';

	export default {
		name: 'index',
		components: {
			appSwiper,
			appNavigationIcon,
			appMyApp,
			uIndexware,
			tastlist,
			'app-tab-bar': appTabBar,
			// 10.11 10.14 注释
			// uGoodsWare
		},
		data() {
			return {
				
				pageList: [],

				homePages: [],
				type: '',
				haveBackground: true,
				page_id: 0,

				value: {
					background: `#f7f7f7`,
					color: '#f7f7f7',
					placeholder: '搜索',
					radius: 28,
					textColor: '#c0c0c0',
					textPosition: `center`,
					shadow: `0 16rpx 32rpx rgba(0, 0, 0, 0.1);`
				},
				// 总页数
				page_count: 1,
				// total_count: 1,
				page: 1,
				limit: 5,
				boxHeight: [],
				beHeight: '',
				blendList: [],
				imgprefix: this.$siteInfo.imgroot,
				timeout: new Date().getTime(),
				itemStyle: 'width:375rpx;height:400rpx',
				// 返回顶部
				top: 400,
				scrollTop: 0,
				opacity: 0,
				keywords: '',

				// 假拼团 11.01
				useridshgold: 0,

				// 11.10 文字导航1
				router: '',
				// 11.10 导航2
				imgstyle: "width: 208rpx;height: 260rpx",
				// 搜索眶前的数据
				froseah: [],
				// 文字导航1 活动数据
				activ: '',
				// 联动轮播
				banner_navs: [],
				banid: 0,
				smswicid: 2, // 大轮播内的小轮播
				// 图片轮播
				imgstyle3: "width: 308rpx;height: 178rpx;",
				// 商品真分享
				targoodsid: 0,
				useridres: 0,
				mallid: 1,
				
			}
		},
		 // onBackPress(){
			//  this.pageBack()
		 // },
		onLoad(options) {
			// // #ifdef MP-WEIXIN
			// // 判断是否从群转发点进去的
			// if (wx.getGroupEnterInfo) {
			// 	wx.getGroupEnterInfo({
			// 		success(res) {
			// 			console.log(res, 'succ');
			// 		},
			// 		fail(res) {
			// 			console.log(res, 'fail');
			// 		},
			// 		complete(res) {
			// 			console.log(res, 'comp');
			// 		},
			// 	})
			// }
			// // #endif
			// 商品真分享
			if (options.targoodsid) {
				this.targoodsid = options.targoodsid
			}
			if (options.useridres) {
				this.useridres = options.useridres
			}
			if (options.mallid) {
				this.mallid = options.mallid
			}
			// 获取个人中心的数据
			this.$nextTick().then(() => {
				this.$store.dispatch('userCenter/data');
			});
			// 假拼团 11.01
			if (options.useridshgold) {
				this.useridshgold = options.useridshgold
			}
			// console.log(options, 123456);
			// console.log(this);
			// 8.30 新加 （如果有 就请求，没有就不请求）
			if (options.q) {
				uni.request({
					url: decodeURIComponent(options.q),
					header: {
						'X-Access-Token': this.$store.state.user.accessToken
					}
				})
			}
			// this.imgprefix = this.$siteInfo.imgroot
			// 测试下分支
			// console.log(options);
			if (typeof options.scene !== 'undefined') {
				if (options.scene === 'share') {
					this.share(options);
				} else {
					this.qrcode(options);
				}
			} else {
				// this.$showLoading();
			}

			if (typeof options.user_id !== 'undefined') {
				this.$store.dispatch('user/setTempParentId', options.user_id);
			}

			this.page_id = typeof options.page_id !== 'undefined' ? Number(options.page_id) : 0;

			this.navsReq()
			this.request()
			// 11.10 搜索眶前的跳转链接
			this.allReq(2350)
			// #ifdef MP-WEIXIN
			wx.showShareMenu({
				menus: ['shareAppMessage', 'shareTimeline']
			})
			const updateManager = wx.getUpdateManager()
			if (updateManager) {
				updateManager.onCheckForUpdate(function(res) {
					// 请求完新版本信息的回调
				})

				updateManager.onUpdateReady(function() {
					wx.showModal({
						title: '更新提示',
						content: '新版本已经准备好，是否重启应用？',
						success(res) {
							if (res.confirm) {
								// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
								updateManager.applyUpdate()
							}
						}
					})
				})
			}
			// #endif
		},
		mounted() {
			this.onReq(2349)
			// this.navsReq()
		},
		onShow() {
			this.keywords = JSON.parse(this.config.vdian_earnings_ratio).keywords
			this.onReq(2349)
			let hivideoid = this.$storage.getStorageSync('hivideoid')
			if (hivideoid) {
				this.$storage.removeStorageSync('hivideoid')
			}
			// 9.14 注释 用户点击分享 进入小程序 到首页不取消用户小店id操作
			/* let sharestoreid = this.$storage.getStorageSync('sharestoreid')
			if (sharestoreid) {
				this.$storage.removeStorageSync('sharestoreid')
			} */
			this.$storage.removeStorageSync('KEFU')

			if (this.$refs.task.show || this.$refs.task.isshow) {
				// 9.29 将showMo方法改为judgetask
				this.$refs.task.judgetask()
				// 	// 9.26 调用父组件的方法 免费得金币
				// 	this.$refs.task.themet.forEach((item) => {
				// 		if (item.type || item.type == 0) {
				// 			this.$refs.task.tasksu(item)
				// 		}
				// 	})
			}
		},
		
		
		// 9.29 离开页面改变 弹窗显示状态
		onUnload() {
			getApp().globalData.firstapplet = false
		},
		/* #ifdef MP_WEIXIN || MP_BAIDU */
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
			this.$store.dispatch('page/actionSetScrollTop', e.scrollTop);
		},
		/* #endif */
		watch: {
			// 返回顶部
			showBackTop(nVal, oVal) {
				// 当组件的显示与隐藏状态发生跳变时，修改组件的层级和不透明度
				// 让组件有显示和消失的动画效果，如果用v-if控制组件状态，将无设置动画效果
				if (nVal) {
					this.opacity = 1;
				} else {
					this.opacity = 0;
				}
			}
		},
		onBackPress(options) {
			uni.showModal({
				title:"qued"
			})
			return true
		},
		// 11.10 文字导航1
		created() {
			this.router = this.$platDiff.tabBarUrl(null, this.pageCount);
		},
		methods: {
			// 返回按钮的回调
			pageBack(){				
				uni.switchTab({
					url:'/pages/index/index'
				})
			},
			// 联动轮播
			change(item) {
				this.banid = item
				// console.log(this.banid);
			},
			smswic(e) {
				this.smswicid = e.detail.current + 2
			},
			// 切换banner+图片
			swichange(e) {
				// console.log(e);
				// this.banid = e.detail.current
			},
			animationfinish(e) {
				this.banid = e.detail.current
			},
			// 客服
			custom() {
				// 9.8注释
				uni.navigateTo({
					url: '/pages/web/web?url=' + this.config.web_service_url
				})
			},
			// 返回顶部
			backTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 300
				});
			},
			share(options) {
				if (typeof options.params !== 'undefined') {
					let params = JSON.parse(options.params);
					this.$jump({
						url: params.path + '?' + this.$utils.objectToUrlParams(params),
						open_type: 'navigate'
					});
				}
			},
			qrcode(options, curl) {
				let url = this.$api.default.qrcode_parameter
				if (curl) {
					url = this.$apiSol.default.qrcode_parameter
				}
				// if (options.scene.indexOf('qjl') != -1) {
				// 	url = this.$apiSol.default.qrcode_parameter
				// }
				if (options.scene.slice(0, 3) == 'qjl') {
					url = this.$apiSol.default.qrcode_parameter
				}

				console.log(options, curl);
				this.$request({
					url: url,
					data: {
						token: options.scene
					}
				}).then(response => {
					if (response.code === 0) {
						/* if (response.data.detail == null) {
							url = this.$apiSol.default.qrcode_parameter
							this.qrcode(options, url)
							return
						} */
						this.$store.dispatch('page/actionSetQeury', null);
						let {
							data,
							path
						} = response.data.detail;
						let url = path == 'plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin' ?
							`${path}` : `/${path}`;
						if (data) {
							url += '?' + this.$utils.objectToUrlParams(data);
							if (typeof data.user_id !== 'undefined') {
								this.$store.dispatch('user/setTempParentId', data.user_id)
							}
						}
						if (`/${path}` != '/pages/index/index' || (typeof data.page_id !== 'undefined' && data
								.page_id !== this.homePages.id !== 0)) {
							this.$jump({
								url: url,
								open_type: 'navigate'
							});
						}
					}
				}).catch(() => {});
			},
			// 请求首页信息
			navsReq() {
				this.$showLoading();
				this.$request({
					url: this.$api.navs.index,
					data: {
						id: 1
					}
				}).then((res) => {
					this.$hideLoading();
					if (res.code === 0) {
						this.pageList = res.data.list
						this.banner_navs = res.data.list[224].subnav
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
					// this.navsReqban()
				}).catch(() => {
					this.$hideLoading();
				})
			},
			// 联动轮播数据
			navsReqban() {
				this.$request({
					url: this.$api.navs.index,
					data: {
						id: 224
					}
				}).then((res) => {
					if (res.code === 0) {
						// this.banner_navs = res.data.list
						let list = []
						list = res.data.list
						for (let i in list) {
							this.banner_navs.push(list[i]);
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				}).catch(() => {

				})
			},
			
			allReq(pid) {
				this.$request({
					url: this.$api.navs.list,
					data: {
						pid: pid,
						// page: this.apage,
						// limit: this.alimit,
						limit: 50,
						status: 1
					}
				}).then((res) => {
					if (pid == 2350) {
						this.froseah = res.data.list
					}
				}).catch(() => {

				})
			},
			// 请求当前导航
			onReq(kid) {
				this.$request({
					url: this.$api.navs.catedetail,
					data: {
						keyword: kid
					}
				}).then((res) => {
					// if (kid == 2350) {
					// 	this.froseah = res.data.list
					// } else 
					if (kid == 2349) {
						this.activ = res.data.list[0]
						if (this.activ.url.toString().indexOf('?') != -1) {
							this.activ.url = this.activ.url + '&title=' + this.activ.name
						} else {
							this.activ.url = this.activ.url + '?title=' + this.activ.name
						}
					}
				}).catch(() => {

				})
			},
			jump(item) {
				
				if (item == '/' || item == 'javascript:;') {
					return
				}
				if (item == '/pages/index/index' || item.indexOf('/pages/gospeed/index') != -1 || item ==
					'/pages/sixty/index' || item == '/pages/user-center/user-center' || item == '/pages/store/mine/mine') {
					uni.reLaunch({
						url: item
					})
					return;
				}
				uni.navigateTo({
					url: item
				})
			},

			// 数据请求 10.11 注释 10.14 放出
			async request(status) {
				this.$showLoading();
				const res = await this.$request({
					url: this.$api.navs.blend,
					data: {
						// pids: '22,47,52,58',
						// 10.14
						pids: '52,58,2172,2173',
						page: this.page,
						limit: this.limit
					}
				});
				if (res.code === 0) {
					this.$hideLoading();
					this.page_count = res.data.pagination.page_count;
					// this.total_count = res.data.pagination.total_count;
					this.blendList = this.blendList.concat(res.data.list.flat())
					this.blendList = this.blendList.filter(function(el) {
						return el.length !== 0;
					});
					this.$storage.setStorageSync('indexLoop', this.blendList)
					uni.stopPullDownRefresh()
				} else {
					this.$hideLoading();
					uni.showModal({
						title: '提示',
						content: res.msg,
					})
				}
			},
			// 10.11 请求商品列表 10.14 注释
			/* async request() {
				this.$showLoading();
				const res = await this.$request({
					url: this.$api.default.goods_list,
					method: 'get',
					data: {
						page: this.page,
						is_sales: 1
					}
				});
				if (res.code === 0) {
					this.$hideLoading();
					this.page_count = res.data.pagination.page_count;
					// this.total_count = res.data.pagination.total_count;
					this.blendList = this.blendList.concat(res.data.list)
					this.$storage.setStorageSync('indexLoop', this.blendList)
					uni.stopPullDownRefresh()
				} else {
					this.$hideLoading();
					uni.showModal({
						title: '提示',
						content: res.msg,
					})
				}
			}, */
			// 10.11 跳转 10.14 注释
			/* routeGo(e) {
				uni.navigateTo({
					url: e.page_url + '&title=' + this.title
				});
			}, */
		},
		computed: {
			// 返回顶部
			showBackTop() {
				// 由于scrollTop为页面的滚动距离，默认为px单位，这里将用于传入的top(rpx)值
				// 转为px用于比较，如果滚动条到顶的距离大于设定的距离，就显示返回顶部的按钮
				return this.scrollTop > uni.upx2px(this.top);
			},
			...mapState({
				userInfo: state => state.user.info,
			}),
			...mapState('mallConfig', {
				config: state => state.mall.setting,
				tabBarLoacl: state => state.tabBarLoacl
			}),
			...mapGetters('iPhoneX', {
				BotHeight: 'getBotHeight',
				emptyHeight: 'getEmpty',
			})
		},
		onShareAppMessage() {
			return this.$shareAppMessage({
				title: this.config.share_title ? this.config.share_title : '双熙堂珠宝',
				imageUrl: this.config.share_pic,
				path: '/pages/index/index',
				params: {

				}
			});
		},
		// #ifdef MP-WEIXIN
		onShareTimeline() {
			return this.$shareTimeline({
				title: this.config.share_title ? this.config.share_title : '双熙堂珠宝',
				query: {

				}
			});
		},
		// #endif
		onReachBottom() {
			// console.log(this.page , this.limit ,this.page_count);
			// 循环
			if (this.page < this.page_count) {
				this.page++;
				this.request();
			} else {
				// this.page = 1
				let indexloop = this.$storage.getStorageSync('indexLoop');
				if (indexloop) {
					this.blendList = this.blendList.concat(indexloop)
				} else {
					this.page = 1
					this.request()
				}
			}
		},
		onPullDownRefresh() {
			this.navsReq()
			this.banner_navs = []
			this.blendList = []
			this.$storage.removeStorageSync('indexLoop')
			this.page = 1
			this.boxHeight = []
			this.beHeight = ''
			this.request()
		}
	};
</script>
<style lang="scss" scoped>
	page {
		background: #f7f7f7;
	}

	.jump {
		width: 100%;
		height: 100%;
	}

	.page-width {
		display: flex;
		align-items: center;
		justify-content: space-around;
	}

	.searcf {
		width: 375rpx;
		height: 400rpx;

		.img {
			width: 375rpx;
			height: 400rpx;
		}
	}

	// 11.10 搜索眶前的图片
	.suiji {
		// width: 160rpx;
		width: 360rpx;
		// width: 90rpx;
		height: 60rpx;
		text-align: center;
		// margin: 0 auto;

		image {
			width: 320rpx;
			height: 60rpx;
		}
	}

	.app-view {
		height: #{88rpx};
		// width: #{704rpx};
		width: 100%;
		flex: 1;
		margin-right: 24rpx;
		position: relative;
		border: none;
	}

	.kefu {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-size: 20rpx;

		image {
			width: 32rpx;
			height: 32rpx;
		}
	}

	.app-text-search {
		z-index: 1000;
		width: #{100%};
		height: #{58rpx};
		line-height: #{58rpx};
		background-color: #f7f7f7;
		border-radius: 28rpx;
		color: #c0c0c0;
		// box-shadow: 0 16rpx 32rpx rgba(0, 0, 0, 0.1);
		box-shadow: 0 0 4rpx rgba(0, 0, 0, 0.1);
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.app-text-search .text {
		font-size: #{26rpx};
	}

	.app-icon {
		margin-right: #{12rpx};
		margin-left: #{12rpx};
		width: #{25rpx};
		height: #{25rpx};
		font-size: 28upx;
		//background-size: 100% 100%;
		//background-image: url("../../../static/image/icon/search.png");
	}

	.input {
		height: #{58rpx};
		flex: 1;
		// width: #{704rpx};
		// border: #{1rpx} solid #dcdfe6;
	}


	.boxshaw {
		box-shadow: -2rpx 0rpx 20rpx #e1e1e1;
	}
	// 11.10 文字导航
	.index-nav {
		width: #{750rpx};
		height: #{80rpx};
		// line-height: 80rpx;
		// margin: 24rpx 0;
	}


	.app-index-nav {
		height: #{80rpx};
		width: #{750rpx};
		// align-items: baseline;

		// 12.06
		.awidth {
			width: 598rpx;
		}

		.newest {
			height: 80rpx;
			line-height: 56rpx;
			display: inline-block;
			font-size: 28rpx;
			text-align: center;
			color: #353535;
			padding: 0 20rpx;
			box-shadow: -2rpx 0rpx 20rpx #e1e1e1;
		}

		.app-scroll {
			// width: #{641rpx};
			height: #{80rpx};
			white-space: nowrap;

			.aheighr {
				height: #{80rpx};
				// line-height: 80rpx;
			}

			.app-item {
				display: inline-block;
				font-size: #{28rpx};
				// margin: 0 24rpx;
				text-align: center;
				color: #353535;
				padding: 0 #{20rpx};
				// box-sizing: border-box;
				// height: #{56rpx};
				line-height: #{56rpx};
				// border-radius: #{28rpx};
				position: relative;

				&.active:before {
					position: absolute;
					bottom: 0;
					left: 0;
					content: '';
					font-weight: 500;
					background: #342B2A;
					border-radius: 4rpx;
					width: 64%;
					left: 50%;
					transform: translateX(-50%);
					height: 8rpx;
				}

				.app-item-imga {
					height: 56rpx;
				}

				.app-item-img {
					height: 80rpx;
					border: none;
					width: 160rpx;
				}
			}

			.app-active-item {
				color: white;
			}

			.default-item {
				background: linear-gradient(140deg, #ffa360, #ff5c5c);
			}
		}
	}

	.activity {
		width: 702rpx;
		margin: 0 auto;
		// height: 396rpx;
		height: 477rpx;
		display: flex;
		justify-content: space-between;

		.assemble {
			// width: 332rpx;
			width: 377rpx;
			height: 100%;

			.swiper {
				height: 100%;

				.slide-image {
					height: 100%;
				}
			}

			/* #ifdef MP-WEIXIN */
			.wx-swiper-dot {
				width: 20rpx;
				height: 4rpx;
				border-radius: 2rpx;

				margin-left: -6rpx;

				&.wx-swiper-dot-active {
					width: 40rpx;
				}
			}

			.wx-swiper-dots.wx-swiper-dots-horizontal {
				margin-bottom: 5rpx;
			}

			/* #endif */
		}

		.listR {
			// width: 332rpx;
			width: 318rpx;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			.listRt {
				// height: 288rpx;
				height: 381rpx;

				&+.listRt {
					height: 96rpx;
					// height: 88rpx;
				}

				.slide-image {
					height: 100%;
				}
			}

			/* .listRt {
				height: 188rpx;

				.slide-image {
					height: 100%;
				}
			} */
		}
	}

	/* 成为双熙堂合伙人 */
	.partner {
		width: 686rpx;
		margin: 20rpx auto;
		// background: linear-gradient(180deg, #EDD5D5 0%, #C8C8C8 100%);
		// border-radius: 32rpx;
		// height: 192rpx;
		overflow: hidden;
	}

	.partner-url {
		width: 100%;
		height: 100%;
	}

	.partner .image {
		width: 100%;
		height: 100%;
	}

	/* 实体店直播，好货快快抢 */
	.beseparate {
		width: 686rpx;
		margin: 20rpx auto;
		display: flex;
		justify-content: space-between;
	}

	.besepone {
		position: relative;
		// padding: 24rpx 24rpx 32rpx 36rpx;
		// width: 328rpx;
		// width: 336rpx;
		// height: 460rpx;
		// height: 416rpx;
		// height: 426rpx;
		width: 340rpx;
		height: 432rpx;
		background: #FFFFFF;
		border-radius: 16rpx;
		overflow: hidden;

		.image {
			// width: 328rpx;
			// height: 416rpx;
			// height: 460rpx;
			// width: 336rpx;
			// height: 426rpx;
			width: 340rpx;
			height: 432rpx;
		}
	}

	.besebutton:nth-child(2n-1) .besepone .besepdec {
		color: #FE4C4B
	}

	.besebutton:nth-child(2n) .besepone .besepdec {
		color: #F2994A
	}

	/* .besepone:first-child .besepimage {
	  width: 118rpx
	}
	
	.besepone:last-child .besepimage {
	  width: 188rpx
	} */

	.besepimage {
		position: absolute;
		bottom: 12rpx;
		right: 24rpx;
		height: 152rpx;
		width: 132rpx
	}


	.besepimage .image {
		height: 100%;
		width: 100%;
	}

	.beseptitle {
		font-weight: bold;
		font-size: 36rpx;
		line-height: 48rpx;
		color: #333;
	}

	.besepdec {
		font-size: 28rpx;
		line-height: 132%;
		font-weight: 500;
	}

	.beseplaying {
		background: linear-gradient(90deg, #FD6E60 0%, #FE4C4B 100%);
		border-radius: 22rpx;
		width: 140rpx;
		height: 40rpx;
		overflow: hidden;
		margin-top: 50rpx;
		padding: 6rpx 20rpx;
		display: flex;
		align-items: center;
	}

	.beseplaying .image {
		height: 28rpx;
		width: 28rpx;
	}

	.beseplaying .text {
		color: #FFFFFF;
		font-size: 22rpx;
		margin-left: 4rpx;
	}

	/* 今日推荐 */
	.today {
		width: 686rpx;
		margin: 20rpx auto;
		box-shadow: 0px 30px 60px rgba(57, 57, 57, 0.1);
		border-radius: 32rpx;
		background: #342B2A;
		display: flex;
		align-items: center;

		.image {
			width: 100%;
			height: 100%;
		}
	}

	.today .icon {
		width: 168rpx;
		height: 160rpx;
		padding-left: 40rpx;
	}

	.today .icon .image {
		width: 100%;
		height: 100%;
	}

	.today .text {
		width: 356rpx;
		text-align: center;
	}

	.today .text .title {
		color: #FFFFFF;
		font-weight: 900;
		font-size: 48rpx;
		line-height: 84rpx;
	}

	.today .text .dec {
		color: #CD9C62;
		font-size: 28rpx;
		line-height: 40rpx;
	}

	/* 今日爆款，猜你喜欢 */
	.betseparate {
		width: 686rpx;
		margin: 20rpx 32rpx;
		display: flex;
		justify-content: space-between;
	}

	.beseptwo {
		width: 328rpx;
		height: 136rpx;
		padding: 20rpx;
		position: relative;
		background: #FFFFFF;
		border-radius: 20rpx;
	}

	.beseptwo:nth-child(2n-1) .betsepfont .circle {
		background: #F08519;
	}

	.beseptwo:nth-child(2n) .betsepfont .circle {
		background: #FF3B30;
	}

	.beseptwo:nth-child(2n-1) .betsep {
		color: #F08519;
	}

	.beseptwo:nth-child(2n) .betsep {
		color: #FF3B30;
	}

	.betsepfont {
		font-weight: bold;
		font-size: 36rpx;
		line-height: 54rpx;
		color: #333333;
	}

	.betsepfont .circle {
		display: inline-block;
		width: 32rpx;
		height: 32rpx;
		border-radius: 50%;
		position: relative;
		left: 14px;
		top: 2px;
	}


	.betsepfont .circle image {
		position: absolute;
		top: 50%;
		left: 56%;
		transform: translate(-50%, -50%);
		width: 8rpx;
		height: 16rpx;
	}

	.betsep {
		font-size: 24rpx;
		line-height: 48rpx;
	}

	// 猜你喜欢不轮播
	.betsepar {
		width: 686rpx;
		margin: 32rpx;
		display: flex;
		justify-content: space-between;
	}

	.betseparone {
		width: 340rpx;
		height: 504rpx;
		// width: 336rpx;
		// height: 498rpx;
		// width: 328rpx;
		// height: 488rpx;
		position: relative;
		background: #FFFFFF;
		border-radius: 16rpx;
		overflow: hidden;

		.image {
			// width: 328rpx;
			// height: 416rpx;
			// width: 336rpx;
			// height: 426rpx;
			width: 340rpx;
			height: 432rpx;

			.img {
				width: 100%;
				height: 100%;
			}
		}

		.title {
			height: 72rpx;
			line-height: 36rpx;
			padding: 10rpx 16rpx;
			color: rgba($color: #000000, $alpha: 0.84);
			font-size: 24rpx;
		}
	}

	/* 猜你喜欢，APP端口 */
	.bepartner {
		width: 686rpx;
		// margin: 32rpx;
		margin: 24rpx;
		display: flex;
		justify-content: space-between;
	}

	.bepartnerone {
		// width: 328rpx;
		// height: 400rpx;
		width: 340rpx;
		height: 412rpx;
		position: relative;
		background: #FFFFFF;
		border-radius: 16rpx;
		overflow: hidden;

		.swiper {
			// width: 328rpx;
			// height: 328rpx;
			width: 340rpx;
			height: 340rpx;
		}

		.image {
			width: 340rpx;
			height: 340rpx;

			.img {
				width: 100%;
				height: 100%;
			}
		}

		.title {
			height: 72rpx;
			line-height: 36rpx;
			padding: 10rpx 16rpx;
			color: rgba($color: #000000, $alpha: 0.84);
			font-size: 24rpx;
		}
	}

	// 联动轮播
	.bannershop {
		width: 708rpx;
		border-radius: 25rpx;
		background-color: #FFFFFF;
		margin: 24rpx auto;
	}

	.app-scroll-banner {
		width: 708rpx;
		height: 48rpx;
		margin: 24rpx auto;
		background-color: #cbcbcb;
		border-radius: 36rpx;
		white-space: nowrap;
		box-shadow: 0 6rpx 10rpx rgba($color: #000000, $alpha: 0.3) inset;

		.app-item {
			display: inline-block;
			font-size: #{28rpx};
			// margin: 0 24rpx;
			text-align: center;
			color: #353535;
			padding: 0 #{20rpx};
			line-height: 48rpx;
			position: relative;

			&.active {
				background: #000000;
				border-radius: 36rpx;
				color: #FFFFFF;
			}
		}
	}

	.banner-swiper {
		width: 708rpx;
		height: 568rpx;
		margin: 0 auto;

		// background-color: #cbcbcb;
		.banner-swiper-item {
			background-color: #cbcbcb;
			border-radius: 25rpx;
		}
	}

	.ban-activity {
		width: 708rpx;
		margin: 0 auto;
		height: 568rpx;
		display: flex;
		justify-content: space-between;

		.ban-act-img {
			width: 708rpx;
			height: 568rpx;
		}

		.ban-assemble {
			width: 486rpx;
			height: 100%;
			position: relative;

			&.fixed {
				position: absolute;
				top: 0;
				left: 0;
			}

			.swiper {
				width: 486rpx;
				height: 100%;

				.slide-image {
					width: 486rpx;
					height: 100%;
				}
			}

			/* #ifdef MP-WEIXIN */
			.wx-swiper-dot {
				width: 20rpx;
				height: 4rpx;
				border-radius: 2rpx;

				margin-left: -6rpx;

				&.wx-swiper-dot-active {
					width: 40rpx;
				}
			}

			.wx-swiper-dots.wx-swiper-dots-horizontal {
				margin-bottom: 5rpx;
			}

			/* #endif */
		}

		.listR {
			width: 190rpx;
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: space-between;

			.listRt {
				height: 258rpx;

				.slide-image {
					height: 100%;
				}
			}
		}
	}

	/* 循环 */
	.beloop {
		// width: 686rpx;
		margin: 32rpx auto 12rpx;
		position: relative;
		/* display: flex;
		justify-content: space-between;
		align-items: center;
		flex-wrap: wrap; */
	}

	.beloopcolumn {
		clear: both !important;
		overflow: hidden;
	}

	.belooptwo {
		width: 350rpx;

		&.left {
			float: left;
		}

		&.right {
			margin-left: 30rpx;
			float: right;
		}
	}

	/* .beloop-list{
		// width: 328rpx;
		display: flex;
		justify-content: space-between;
	} */

	.belooprow {
		position: absolute;
		top: 0;
		left: 0;
		margin-bottom: 32rpx;
		width: 350rpx;
		background: #FFFFFF;
		box-shadow: 0px 30rpx 60rpx rgba(57, 57, 57, 0.1);
		border-radius: 16rpx;
		overflow: hidden;
	}

	.belooprow .image {
		width: 100%;
		// height: 470rpx;
		position: relative;

		.no-goods {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			background-color: rgba(0, 0, 0, 0.3);
			margin: 0 auto;

			.no-title {
				width: 124rpx;
				height: 124rpx;
				border-radius: 50%;
				background-color: rgba($color: #000000, $alpha: 0.5);
				backdrop-filter: blur(9px);
				font-size: 36rpx;
				text-align: center;
				line-height: 124rpx;
				color: #FFFFFF;
				font-weight: bold;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
			}
		}
	}

	.belooprow .image .img {
		width: 100%;
		// height: 100%;
	}

	.belooprow .title {
		// margin: 8rpx 14rpx 24rpx;
		margin: 8rpx 14rpx;
		font-size: 24rpx;
		line-height: 36rpx;
		font-weight: 700;
		color: rgba(0, 0, 0, 0.84);
	}

	// 商品列表
	.product-list {
		margin-top: #{52rpx};
	}

	// 返回顶部
	.quick-box {
		position: fixed;
		bottom: #{40rpx};
		right: #{48rpx};
		z-index: 100;
		transition: opacity 0.4s;
	}

	.quick-btn {
		width: #{80rpx};
		height: #{80rpx};
		margin-top: #{32rpx};
	}
</style>
